package cn.sstech.member.core.util.model;

import java.util.ArrayList;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel
public class PageSet {
	
	int page;
	int size;
	List<PageSetSort> sort;
	@ApiModelProperty(hidden=true)
	int rowStartPoint;
	
	public PageSet(int page, int size, List<PageSetSort> sort){
		this.page = page;
		this.size = size;
		this.sort = null == sort ? new ArrayList<PageSetSort>() : sort;
	}

	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public int getSize() {
		return size;
	}

	public void setSize(int size) {
		this.size = size;
	}

	public List<PageSetSort> getSort() {
		return sort;
	}

	public void setSort(List<PageSetSort> sort) {
		this.sort = sort;
	}

	public int getRowStartPoint() {
		rowStartPoint = (page - 1)*size;
		return rowStartPoint;
	}

	public void setRowStartPoint(int rowStartPoint) {
		this.rowStartPoint = rowStartPoint;
	}
	
}
